The invention relates to a method for detecting static areas in a sequence of digital video pictures. Such a method can be used generally in video signal processing devices for detecting motion in a sequence of video pictures. More specifically one application of the invention is the field of temporal video format conversion, which may or may not be motion-compensated. This includes algorithms for video upconversion such as in TV receivers equipped with 50 Hz to 100 Hz upconversion means. This field of application includes low-end upconversion algorithms where simple field/frame repetitions are used to generate intermediate fields/frames and high-end upconversion algorithms where intermediate fields/frames are calculated using motion estimation/compensation techniques. Another field of application is video standard conversion, typically 50 Hz to 60 Hz or 60 Hz to 50 Hz. Other important applications are the fields of MPEG video encoding and interlace to progressive scan conversion (deinterlacing).
The availability of a map of the static areas in a sequence of video pictures allows the implementation of specific processing for the pixels of non-moving areas. This allows e.g. for maintaining full resolution in static areas of a picture when using motion compensation techniques either for interpolating images (conversion techniques) or for reconstructing images (compression techniques). Generally the information concerning static areas is useful for all algorithms which detect motion in video pictures sequences as the areas with zero motion are the ones which occur statistically most frequently in broadcasted video scenes.
In an upconversion or a video standards conversion application, the resolution of the output sequence may be optimised in non-moving areas by switching motion-compensated processing off and simply copying the source pixels to the output.
In the field of MPEG2 video encoding, savings in bit rate can be achieved by transmitting a minimal amount of information in the blocks classified as static. Indeed, provided that the motion-compensation applies to two frames or two fields with the same parity, it is sufficient for static blocks to transmit only the information that the block is static. This means that the motion vector for the block is 0, and that all prediction errors (reference is made to the MPEG2 video standard with respect to this expression), should be 0 (they may not be exactly 0, but if it is determined that the block is static, then it is clear that non-zero prediction errors represent noise contributions which should not be transmitted).
An additional benefit results from the fact that the human eye is more sensitive to defects in still areas than in moving areas, so that the information concerning the position of static areas in the pictures is highly welcome, because by simply copying the source pixels of the static areas defects due to motion compensation processing will be avoided.
The object of the invention is to provide a reliable algorithm for detecting static areas in a sequence of video pictures. This object is achieved according to the invention by means of the measures specified in claim 1.
In principle the method according to the invention consists of five steps:
First, a computation of pixel difference values between corresponding pixels of consecutive frames or consecutive fields with identical parity is performed.
Second, the magnitudes of the pixel differences over pixel blocks of the video pictures are accumulated.
Third, threshold values for the accumulated pixel differences are computed for the blocks.
Fourth, the threshold values are compared to the accumulated pixel differences, thus providing a raw map of static blocks.
Fifth, the raw map of static areas is cleaned up by eliminating isolated static blocks or small groups of adjacent static blocks.
The present invention achieves a good reliability of the detection of static blocks in case of interlaced sources because it operates on two fields having the same parity. Thus, unwanted disturbances due to interlace effects are avoided. The robustness of the detection of static areas in the presence of noise is improved by accumulating the magnitudes of the difference values of corresponding pixels, as the random variations of the noise component are smoothed out.
Advantageous developments of and improvements to the method specified in claim 1 are possible by virtue of the measures evinced in the dependent claims. The reliability of the method is further increased by adapting the thresholds for the blocks to an estimated noise level of the field or frame and to the amount of a block gradient. The reason for taking block gradients into account is that even very small movements of the video camera will cause significant pixel differences in areas where high spatial frequencies are present. The formula for the determination of the thresholds therefore includes a xe2x80x9cpenaltyxe2x80x9d term which is proportional to the block gradient.
A simple formula for calculating the thresholds taking this into account is given in claim 3. If in a block a lot of high spatial frequency components and/or substantial noise is present, then the corresponding threshold which will be compared to the accumulated pixel differences of the block will be high. With these measures the decision of classifying a block to be static or non-static is somewhat normalised, i.e. made independent of noise and picture content.
One preferred embodiment for determining the block gradients is presented in claim 4.
Preferred examples for the proportional constants xcex1, xcex2 in the formula for calculating thresholds are given in claim 5.
Advantageous developments of and improvements to the method specified in claim 1 are possible by virtue of the measures evinced in the dependent claims. One preferred embodiment for determining the block gradients is presented in claim 4.
A simple embodiment for applying the thresholds to the accumulated frame differences is presented in claim 6.
An advantageous solution for cleaning up the preliminary map of static areas is presented in claim 7. Therein, isolated static blocks or small groups of adjacent blocks are eliminated from the preliminary map of static/non-static blocks.
Important examples of devices where the invention may be used are claimed in claims 9 to 11.